package com.learn.dataOrigin;

import com.redis.E;

import javax.sound.midi.Soundbank;

public class UseLinkedList {
    public static void main(String[] args) {
        LinkedList<String> ll = new LinkedList<>();

        String s1 = "a";
        String s2 = "b";
        String s3 = "c";

        Node<String> node = new Node<>(null,s1,null);
        ll.first = node;
        ll.last = node;
        ll.size = 1;

        Node<String> node2 = new Node<>(node,s2,null);
        node.next = node2;
        ll.last = node2;
        ll.size = 2;

        Node<String> node3 = new Node<>(node2,s3,null);
        node2.next = node3;
        ll.last = node3;
        ll.size = 3;

        System.out.println(ll.toString());
        System.out.println(ll.size);

    }

}
